package com.yinhai.message.implement.email.common;

import org.simplejavamail.email.Email;

import com.yinhai.message.implement.email.sender.vo.EmailMessage;

/**
 * 用于构建邮箱实体
 * @author maxp
 * @Create 2017-01-03-9:21
 */
public class TAMail {

    /**
     * 单例
     * @return
     */

    private static TAMail taMail = new TAMail();
    private TAMail(){}
    public static TAMail getSington(){
        return taMail;
    }

    public Email getMail(EmailMessage message){
        Email email = new Email();
        email.setFromAddress(message.getFromName(),message.getFromAddress());
        return email;
    }






}
